package com.hzw.entity;

import com.hzw.common.MapperGenerator;
import lombok.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.List;
import java.util.Map;


@Data
@Entity
@Table ( name ="shopping_car" )
public class ShoppingCar {
  private static final long serialVersionUID = 1L;

  @Column(name = "id" )
  @Id
  private String id;

  @Column(name = "userId" )
  private String userId;

  @Column(name = "commodity" )
  private String commodity;

  @Column(name = "create_time" )
  private String createTime;

  /**
   * 购物车内商品大字段
   */
  private Map<String,String> commodityMap;
  /**
   * 新增商品 Map  商品名->数量
   */
  private Map<String,String> newCommoduty;

  private List<Map<String,Object>> commodityList;

  public ShoppingCar () {
  }

  public static void main(String[] args) {
    System.out.println(MapperGenerator.genMapper(ShoppingCar.class));
  }

}
